<extend name="Base/common"/>
<block name="header">
  <header class="bar bar-nav"> 
      <a href="{:U('/')}" class="logo"><img src="{:get_cover(C('WAP_LOGO'),'path')}" height="34" alt="{:C('WEB_SITE_TITLE')}"></a> 
      <span class="nav-invite">客服：<a class="text-danger" href="TEL:{:C('WEB_SITE_TEL')}">{:C('WEB_SITE_TEL')}</a></span> 
  </header>
</block>
<block name="body"> 
  {:hook('noticeMsg')}
  <!-- 首页幻灯 --> 
  {:hook('advertise', array('where' => 'tid = 4 AND status = 1', 'num' => 8, 'tpl' => 'theme2'))}
  <!-- 搜索 -->
  <form action="{:U('Item/search')}" class="content-padded" method="get">
    <div class="control-group search"> <i class="icon icon-search"></i>
      <input type="search" name="keyword" placeholder="请输入关键词">
    </div>
  </form>
  <!-- 首页商品分类 --> 
  {:W('ItemCategory/category', array(array('limit' =>8)))} 
  <div class="bgff margin-tb">
    <!--品牌-->
    <style>
    .bgff{background:#ffffff;}
    .margin-tb{ margin:10px 0;}
    .wap_index_1x4{ width:100%;}
    .wap_index_1x4 .flex-box img{ margin-right:7.5px;}
    .padding-l{padding-left:7.5px}
    .bgff .logo-brand{padding:10px 0 10px 10px}
    .wap_index_1x4 .flex-box{ width:100%; padding-left:10px;}
    .logo-brand li { width:25%; padding-right:7.5px;margin-bottom:7.5px; height:5.6vh; line-height:5.6vh; text-align:center; float:left; overflow: hidden;;}
    .logo-brand img{ vertical-align:middle;float:left; background:#fff; object-fit:contain; width:100%; height:100%;}
    .logo-brand{ display:inline-block}
    .logo-brand .brand-more a{text-align:center; color:#000; font-size:14px;}
    </style>
      <div class="logo-brand">
        <ul>
        <volist name="brand" id="vo">
        <if condition="$i lt 8">
          <li>
           <a href="{:U('Item/search',array('brand'=>$vo['id']))}">
            <img class="lazy" alt="{:get_short($vo['name'],10)}" src="{:get_cover($vo['pic'], 'path')}">
           </a>
          </li>
        </if>
        </volist>
        <notempty name="brand">
          <li class="brand-more" data-page="0">
           <a href="{:U('Item/brand')}">更多 &gt;</a>
          </li>
        </notempty>
        </ul>
      </div>
      <!-- 首页小图广告 --> 
      {:hook('advertise', array('where' => 'tid = 5 AND status = 1', 'num' => 6, 'tpl' => 'index_1x4'))}
  </div>
  <!--推荐商品-->
  <div class="c">
    <div class="in-floor mag-top">
      <div class="in-floor-title">
        <ul>
          <volist name="advKeyword" id="vo">
            <li><a href="{:U('Item/search',array('keyword'=>$vo))}">{$vo}</a></li>
          </volist>
        </ul>
      </div>
      {:hook('advertise', array('where' => 'tid = 3 AND status = 1', 'num' => 7, 'tpl' => 'home_active_'))}
    </div>
  </div>
  <!-- 首页商品列表 --> 
  {:W('Item/homeItemList', array(array('trait'=> 2, 'num'=> 24)))} 
</block>
<block name="script"> 
  <script>
    seajs.use(['index', 'wechat','wechats'], function(index, wechat, wechats){
      wechat.init();
      $(function(){
          // 兼容问题处理
          $.get("{:U('ajaxAd')}",{},function(rtn){
              if(rtn.status){
                  $('#J_advers ul').html(rtn.html);
              }
          },'json');
      });
    });
  </script>
</block>
